﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Dali.Response
{
  public class Groups_8_15 : DaliResponse
  {
    public bool IsMemberOf(int group)
    {
      byte mask;

      if (group >= 8 && group <= 15)
      {
        mask = 1;
        mask <<= (byte)(group - 8);
        return ((this.hidCommand[6] & mask) > 0);
      }
      else
      {
        throw new ArgumentOutOfRangeException("group", "valid values are 8 through 15");
      }
    }

  }
}
